﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using imaginecup.information;
using imaginecup.objectManager;

namespace Imaginecup.gameState.malaria.componentInit
{

    public class CmpRenderRegister
    {
     
        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpRender(ObjManData);
        }

        private static void RegisterCmpRender(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_CHILD);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_MALARIA);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_COMPOSITE_PANEL);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_ITEMPANEL);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_PROGRESSBAR);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_FACTORYUI);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_TOP);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_FIELD_ITEM);
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_RENDER, ComponentTypeID.CID_RENDER_BACK);
          
        }

    }

    public class CmpFieldItemRegister
    {
        private static SComponentTypeID m_SComponentTypeIDETC = ComponentTypeID.CID_FIELD_ITEM_ENTITY;

        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpRender(ObjManData);
        }

        private static void RegisterCmpRender(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDETC);
        }

    }

    public class CmpFieldFrogRegister
    {
        private static SComponentTypeID m_SComponentTypeIDETC = ComponentTypeID.CID_FIELD_FROG_ENTITY;

        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpRender(ObjManData);
        }

        private static void RegisterCmpRender(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDETC);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHANGE_MALARIAPOSITION, m_SComponentTypeIDETC);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_MALARIA_DIE, m_SComponentTypeIDETC);
        }
    }


    public class CmpETCRegister
    {
        private static SComponentTypeID m_SComponentTypeIDETC = ComponentTypeID.CID_ETC;


        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpRender(ObjManData);
        }

        private static void RegisterCmpRender(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDETC);
           // objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_, m_SComponentTypeIDRender);
        }

    }


    public class CmpItemEntityRegister
    {
        private static SComponentTypeID m_SComponentTypeIDEntity = ComponentTypeID.CID_ITEM_ENTITY;
                  

        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpEntity(ObjManData);
        }

        private static void RegisterCmpEntity(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHECK_INPUT, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_MALARIA_DIE, m_SComponentTypeIDEntity);
           // objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHECK_INPUT, m_SComponentTypeIDEntity);
        }

    }
   

    public class CmpChildrenEntityRegister
    {
        private static SComponentTypeID m_SComponentTypeIDEntity = ComponentTypeID.CID_CHILDREN_ENTITY;


        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpEntity(ObjManData);
        }

        private static void RegisterCmpEntity(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHECK_STATE, m_SComponentTypeIDEntity);

        }
    }

  
    public class CmpFieldSceneRegister
    {
        private static SComponentTypeID m_SComponentTypeIDEntity = ComponentTypeID.CID_FIELD_SCENE;


        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpEntity(ObjManData);
        }

        private static void RegisterCmpEntity(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHANGE_CHILDRENPOSITION, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHANGE_MALARIAPOSITION, m_SComponentTypeIDEntity);
        }
    }

    public class CmpObserverRegister
    {
        private static SComponentTypeID m_SComponentTypeIDEntity = ComponentTypeID.CID_OBSERVER_CHAR;


        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpEntity(ObjManData);
        }

        private static void RegisterCmpEntity(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHILD_DIE, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_MALARIA_DIE, m_SComponentTypeIDEntity);
        }
    }

    public class CmpMessageNoneRegister
    {
        private static SComponentTypeID m_SComponentTypeIDEntity = ComponentTypeID.CID_MESSAGE_NONE;


        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpEntity(ObjManData);
        }

        private static void RegisterCmpEntity(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDEntity);
        }
    }

    public class CmpMalariaEntityRegister
    {
        private static SComponentTypeID m_SComponentTypeIDEntity = ComponentTypeID.CID_MALARIA_ENTITY;

       

        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpEntity(ObjManData);
        }

        private static void RegisterCmpEntity(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHANGE_CHILDRENPOSITION, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHILD_DIE, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHECK_INPUT, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHECK_ATTACK, m_SComponentTypeIDEntity);
        }
    }
 
    public class CmpPanelEntityRegister
    {
        private static SComponentTypeID m_SComponentTypeIDEntity = ComponentTypeID.CID_PANEL_ENTITY;


        public static void RegisterCmp(ObjectManagerData ObjManData)
        {
            RegisterCmpEntity(ObjManData);
        }

        private static void RegisterCmpEntity(ObjectManagerData objManData)
        {
            objManData.RegisterInterfaceWithComponent(InterfaceID.IID_ENTITY, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_CHECK_INPUT, m_SComponentTypeIDEntity);
            objManData.RegisterMessageTypeWithComponent(MessageTypeID.MT_SELECT_ITEM_DROP, m_SComponentTypeIDEntity);
        }
    }


    
}
